<!DOCTYPE html>
<html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <base target="_blank">
    <title>[[${kw}]]-有贝口腔网</title>
    <meta name="keywords" content="龅牙,口腔知识,口腔资讯,口腔问题" />
    <meta name="description" content=龅牙,有贝口腔网为用户提供专业的口腔资讯，口腔知识，口腔问题，口腔卫生等综合服务型网站  />

    <link rel="stylesheet" href="/css/reset.css?myv=1595672251140">
    <link rel="stylesheet" href="/css/commone.css?myv=1595672251140">
    <link rel="stylesheet" href="/css/commtwo.css?myv=1595672251140">
    <link rel="stylesheet" href="/css/commthree.css?myv=1595672251140">
    <link rel="shortcut icon" href="./images/icon.png" type="image/x-icon">

    <link rel="stylesheet" media="screen and (min-width:481px)" href="/css/pc/searchlist.css?myv=1595672251140">
    <link rel="stylesheet" media="screen and (max-width:480px)" href="/css/phone/searchlist.css?myv=1595672251140">

    <script type="text/javascript">
        var basePath ="/";
    </script>
    <script src="/js/module/common.js?myv=1595672251140"></script>
    <script src="/js/jquery-3.5.1.min.js?myv=1595672251140"></script>
    <script src="/js/page/footfixed.js?myv=1595672251140"></script>

</head>
<body>
<div class="content">


    <div th:include="/user_page/usercenter_head :: usercenterhead"></div>

    <div class="content-main">
        <!-- <th:block th:insert="top::tab"/> -->

        <div class="search-info">
            <div class="search-content">
                <div class="search-area">
                    <form th:action="@{'/search'}" method="get" target="_self">
                        <div class="main-search">
                            <input class="main-search-input" type="text" name="kw" placeholder="请输入相关口腔信息搜索" th:value="${kw}">
                            <label>
                                <img src="images/search-icon.png">
                                <input type="submit" value="搜索">
                            </label>
                        </div>
                    </form>
                    <div class="search-tuijian" style="display:none">
                        <span>热门搜索</span>
                        <div>
                            <a href="/">矫正器</a>
                            <a href="/">矫正器</a>
                            <a href="/">矫正器</a>
                            <a href="/">矫正器</a>
                        </div>
                        <span>换一组看看</span>
                    </div>
                </div>
                <div class="search-list" th:if="${pa.getTotal() eq 0}">
                    <div class="search-result">为您找到相关结果约0个</div>
                </div>
                <div class="search-list"  th:if="${pa.getTotal() ne 0}">
                    <div class="search-result">为您找到相关结果约<span th:text="${pa.getTotal()}"></span>个</div>

                    <div class="search-list-item" th:each="rows:${pa.getRows()}">
                        <div class="search-item-left" th:if="${rows.getTp() ne null && rows.getTp() ne ''}">
                            <a th:href="@{'/answers/particulars/'+${rows.getTid()}}">
                                <img th:src="${rows.getTp()}" alt="有贝口腔网">
                            </a>
                        </div>

                        <div class="search-item-text">
                            <div class="search-item-title">
                                <a th:href="@{'/answers/particulars/'+${rows.getTid()}}" th:text="${rows.getTitle()}"></a>
                            </div>

                            <div class="search-item-desc">
                                <a th:href="@{'/answers/particulars/'+${rows.getTid()}}" th:text="${rows.getIntroduce()}"></a>
                            </div>

                            <div class="list-item-info">
                                <a th:href="@{'/answers/particulars/'+${rows.getTid()}}"><span class="tui-jian" th:text="${rows.getTname()}"></span></a>
                                <a href="/user/1281956387039088640" class="user-img-name">
                                    <img src="http://rs.hasbei.com/011.jpg" th:src="${rows.getPhoto_path()}">
                                    <span class="user-name" th:text="${rows.getUsername()}"></span>
                                </a>
                                <div class="ping-lun">
                                    <a th:href="@{'/answers/particulars/'+${rows.getTid()}}">
                                        <img src="images/pinglun.png">
                                        <span th:text="${rows.getCount()+'回答'}"></span>
                                    </a>
                                </div>
                                <div class="shou-cang">
                                    <a th:href="@{'/answers/particulars/'+${rows.getTid()}}">
                                        <img src="images/shoucang.png">
                                        <span th:text="${rows.getCollect_num()+'收藏'}"></span>
                                    </a>
                                </div>

                                <div class="yue-du">
                                    <a th:href="@{'/answers/particulars/'+${rows.getTid()}}">
                                        <img src="images/yuedu.png">
                                        <span th:text="${rows.getRead_num()+'阅读'}"></span>
                                    </a>
                                </div>
                                <span class="dotted">·</span>
                                <span class="time-before" th:text="${rows.getPublish_time()}"></span>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="fen-ye"></div>
            </div>


            <div class="aside-left margin-t0" >

                <div class="wonderful-top">
                    <div class="wonderful-top-title">热搜排行</div>
                    <div class="allsee-item">
                        <ul>
                            <li th:each="sou,souStat:${findSou}">
                                <a href="/zx/detail/202007021278381135054901248">
                                    <span class="other-bg" th:if="${souStat.index le 2}" th:text="${souStat.index + 1}"></span>
                                    <span th:if="${souStat.index gt 2}" th:text="${souStat.index + 1}"></span>
                                    <div th:text="${sou.getTitle()}"></div>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

        </div>
    </div>


    <div  class="content-foot">
        <div class="content-foot-info">
            <div class="foot-left">
                <a href="/">
                    <img src="images/foot-logo.png" alt="有贝口腔网">
                    <div>www.hasbei.com</div>
                </a>
            </div>
            <div class="foot-line"></div>
            <div class="foot-right">
                <ul class="foot-info">
                    <li><a href="/about/me" target="_blank">关于我们</a></li>
                    <li><a href="/about/link" target="_blank">联系我们</a></li>
                    <li><a href="/about/map" target="_blank">网站地图</a></li>
                    <li><a href="/about/leave" target="_blank">留言反馈</a></li>
                    <li><a href="/about/zhaoping" target="_blank">招聘信息</a></li>
                    <li><a href="/about/agree" target="_blank">用户协议</a></li>
                    <li></li>
                </ul>
                <ul class="youqing-link">
                    <div >友情链接：</div>
                    <li><a href="http://www.hasbei.com">口腔网</a><span class="line-verctil">|</span></li>
                    <li><a href="http://www.ebrace.com.cn" rel="nofollow">瑞通生物</a><span class="line-verctil">|</span></li>
                    <li><a href="http://www.dmcapital.cn/" rel="nofollow">德摩资本口腔基金</a></li>
                </ul>
                <p class="beian-info">
                    <a href="javascript:void(location.href='http://www.beian.miit.gov.cn/')" rel="nofollow">粤ICP备20050465号</a> /
                    <a href="/">增值电信业务经营许可证</a>
                    <a href="/">互联网医疗保健信息服务同意书</a>
                </p>
                <p class="beian-info"> @ 2020 深圳有贝信息科技有限公司 All Rights Reserved</p>
            </div>
        </div>
        <!-- 移动端 -->
        <div class="content-foot-info-phone">
            <ul class="foot-list">
                <li><a href="/about/me" target="_blank">关于我们</a></li>
                <li><a href="/about/link" target="_blank">联系我们</a></li>
                <li><a href="/about/map" target="_blank">网站地图</a></li>
                <li><a href="/about/leave" target="_blank">留言反馈</a></li>
                <li><a href="/about/zhaoping" target="_blank">招聘信息</a></li>
                <li></li>
                <li></li>
            </ul>
            <div class="foot-info">
                <div class="foot-left">
                    <a href="#">
                        <img src="images/foot-logo.png" alt="有贝口腔网">
                        <div>www.hasbei.com</div>
                    </a>
                </div>
                <p><a href="javascript:void(location.href='http://www.beian.miit.gov.cn/')" rel="nofollow">粤ICP备20050465号</a></p>
            </div>
        </div>
    </div>
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?4245936cbef31e434e2b387b56dfd7d8";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);

            var pageCount = [[${pa.getSum()}]];
            var pageNum = [[${pa.getCurrentPage()}]]
            window.console.log(pageCount+"---"+pageNum);
            icon_load(pageCount,pageNum);
        })();

        function getUrlParams(name) { // 不传name返回所有值，否则返回对应值
            var url = window.location.search;
            if (url.indexOf('?') == 1) { return false; }
            url = url.substr(1);
            url = url.split('&');
            var name = name || '';
            var nameres;
            // 获取全部参数及其值
            for(var i=0;i<url.length;i++) {
                var info = url[i].split('=');
                var obj = {};
                obj[info[0]] = decodeURI(info[1]);
                url[i] = obj;
            }
            // 如果传入一个参数名称，就匹配其值
            if (name) {
                for(var i=0;i<url.length;i++) {
                    for (const key in url[i]) {
                        if (key == name) {
                            nameres = url[i][key];
                        }
                    }
                }
            } else {
                nameres = url;
            }
            // 返回结果
            return nameres;
        }

        $(".search-item-title").each(function () {
            var str=$(this).text();
            //alert(str);
            var res1 = getUrlParams('kw');
            var substr= "/"+res1+"/g";
            var replaceStr=str.replace(eval(substr),"<span style='color:red;font-weight:bold'>"+res1+"</span>");
            replaceStr = "<a href='/qa/detail/202007221285859122092314624'>" + replaceStr + "</a>";
            console.log(replaceStr);
            $(this).html(replaceStr);
        });

        //页面加载时生成按钮
        function icon_load(pageCount,pageNum){
            //生成分页按钮
            if(pageCount > 10){
                pageGroup(pageNum,pageCount);
            }else{
                page_icon(1,pageCount);
            }
        }
        //跳转页面
        function pageGroup(pageNum,pageCount){
            switch(pageNum){
                case 1:
                    page_icon(1,10);
                    break;
                case 2:
                    page_icon(1,10);
                    break;
                case 3:
                    page_icon(1,10);
                    break;
                case 4:
                    page_icon(1,10);
                    break;
                case 5:
                    page_icon(1,10);
                    break;
                case pageCount-3:
                    page_icon(pageCount-9,pageCount);
                    break;
                case pageCount-2:
                    page_icon(pageCount-9,pageCount);
                    break;
                case pageCount-1:
                    page_icon(pageCount-9,pageCount);
                    break;
                case pageCount:
                    page_icon(pageCount-9,pageCount);
                    break;
                default:
                    page_icon(pageNum-4,pageNum+4);
                    break;
            }
        }

        //根据当前选中页生成页面点击按钮
        function page_icon(page,count){
            var currentPage = [[${pa.getCurrentPage()}]];
            var kw = '[[${kw}]]';
            var sum = [[${pa.getSum()}]];
            var ul_html = "";
            console.log(currentPage);
            if(currentPage > 1){
                ul_html +=  "<div class='fenye-list'><a href=/search?kw="+kw+"&p="+(currentPage-1)+" target='_self'>上一页</a></div>";
            }
            for(var i=page; i<=count; i++){
                if(currentPage == i){
                    ul_html += "<div class='fenye-list'><span class='selected'>"+i+"</span></div>";
                }else{
                    ul_html += "<div class='fenye-list'><a href=/search?kw="+kw+"&p="+i+" target='_self'>"
                        +i+"</a></div>";
                }
            }
            if(currentPage < sum){
                ul_html +=  "<div class='fenye-list'><a href=/search?kw="+kw+"&p="+(currentPage+1)+" target='_self'>下一页</a></div>";
            }
            $(".fen-ye").html(ul_html);
        }

    </script>


</div>
</body>
</html>